﻿using DotNetMVC.DTO;
using DotNetMVC.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DotNetMVC.IService
{
    public partial interface ISiteNavService : IBaseService<SiteNav>
    {
        SiteNavDTO[] GetSiteNavs();
        SiteNavDTO[] GetShowSiteNavs(int navLevel = 0);

        /// <summary>
        /// 递归获取菜单
        /// </summary>
        /// <param name="navLevel">菜单级数， 不指定，默认返回全部</param>
        /// <returns></returns>
        List<SiteNavDTO> GetSiteNavsByLevel(int navLevel=0);

        SiteNavDTO GetDTOById(long id);
        SiteNavDTO[] GetSiteNavsByFunCode(string funCode);

        SiteNav Add(FunctionalModuleDTO modelFunctionalModule, SiteNavDTO modelParentNav, string navName, string navUrl, string navTarget, bool isShow, string navImg, int sort);
        void Update(long id, FunctionalModuleDTO modelFunctionalModule, SiteNavDTO modelParentNav, string navName, string navUrl, string navTarget, bool isShow, string navImg, int sort);
    }
}
